home *** CD-ROM | disk | FTP | other *** search
- Path: lrz-muenchen.de!news
- From: watzka@stat.uni-muenchen.de (Kurt Watzka)
- Newsgroups: comp.lang.c
- Subject: Re: Limit on #bytes inside of struct?
- Date: 12 Feb 1996 11:17:31 GMT
- Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
- Distribution: world
- Message-ID: <4fn7kb$ii2@sparcserver.lrz-muenchen.de>
- References: <4feg1d$d4g@cville-srv.wam.umd.edu> <4ffg6b$ivd@sparcserver.lrz-muenchen.de> <4ffohq$1gb@mordred.gatech.edu> <4ffun7$1l4l@cymbal.aix.calpoly.edu> <311F15D8.78D1@zess.uni-siegen.de>
- NNTP-Posting-Host: sun2.lrz-muenchen.de
-
- Markus Becker <becker@zess.uni-siegen.de> writes:
-
- >Dan Stubbs wrote:
- >> Here is a specific program to test the above suggestions.
-
- >No it isn't, see below.
-
- >> typedef struct {
- >> int the_array[50000];
- >> } struct_type;
- >>
-
- >This way, you don't put the 50K numbers in the struct, but only
- >a pointer to them. Should be at most 4 bytes.
-
- If sizeof(struct_type) is sizeof(int *) in your implementation,
- there is something seriously wrong with that implementation. An
- array of int is _not_ a pointer to int. The size of a struct
- that contains an array of 50000 ints is greater than or equal
- to 50000 times the size of an int.
-
- Kurt
- --
- | Kurt Watzka Phone : +49-89-2180-6254
- | watzka@stat.uni-muenchen.de
- | ua302aa@sunmail.lrz-muenchen.de
-